<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/business/inductionfurnace/Base_InductionFurnace.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/business/inductionfurnace/Base_InductionFurnace.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '感应炉',
                name: 'inductionfurnace/Base_InductionFurnace',
                url: "/Base_InductionFurnace/",
                sortName: "StartTime",
                foreignKey:null
            });
            const editFormFields = ref({"HeatNo":"","HeatName":"","SetYield":"","MinimumSetting":"","MaximumSetting":"","ResidualSettings":"","LastProductNo":"","LastProductName":"","CurrentProductNo":"","CurrentProducName":"","AnotherProductNo":"","AnotherProducName":"","BatchNumber":"","StartTime":"","EndTime":"","Inventory":"","CalculateProportion":"","EstimatedProduction":"","State":"","Enable":""});
            const editFormOptions = ref([[{"title":"炉号","field":"HeatNo"},
                               {"title":"名称","field":"HeatName"},
                               {"title":"设定生产量","field":"SetYield"}],
                              [{"title":"最小生产量","field":"MinimumSetting"},
                               {"title":"最大生产量","field":"MaximumSetting"},
                               {"title":"换品残留计算值","field":"ResidualSettings","type":"decimal"}],
                              [{"title":"前一炉订单号","field":"LastProductNo"},
                               {"title":"前一炉产品名称","field":"LastProductName"},
                               {"title":"当前炉订单号","field":"CurrentProductNo"}],
                              [{"title":"当前炉生产名称","field":"CurrentProducName"},
                               {"title":"下一炉订单号","field":"AnotherProductNo"},
                               {"title":"下一炉产品名称","field":"AnotherProducName"}],
                              [{"title":"当前批号","field":"BatchNumber"},
                               {"title":"当前开炉时间","field":"StartTime"},
                               {"title":"计划结束时间","field":"EndTime"}],
                              [{"title":"实际投料量","field":"Inventory","type":"decimal"},
                               {"title":"实际产量计算比例","field":"CalculateProportion","type":"decimal"},
                               {"title":"预估实际产量","field":"EstimatedProduction","type":"decimal"}],
                              [{"dataKey":"感应炉_状态","data":[],"title":"状态","field":"State","type":"select"},
                               {"dataKey":"enable","data":[],"title":"是否启用","field":"Enable","type":"select"}]]);
            const searchFormFields = ref({"HeatNo":"","HeatName":""});
            const searchFormOptions = ref([[{"title":"炉号","field":"HeatNo"},{"title":"名称","field":"HeatName"}]]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'HeatNo',title:'炉号',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'HeatName',title:'名称',type:'string',width:110,align:'left'},
                       {field:'SetYield',title:'设定生产量',type:'string',width:110,align:'left'},
                       {field:'MinimumSetting',title:'最小生产量',type:'string',width:110,align:'left'},
                       {field:'MaximumSetting',title:'最大生产量',type:'string',width:110,align:'left'},
                       {field:'ResidualSettings',title:'换品残留计算值',type:'decimal',width:110,align:'left'},
                       {field:'LastProductNo',title:'前一炉订单号',type:'string',width:110,align:'left'},
                       {field:'LastProductName',title:'前一炉产品名称',type:'string',width:110,align:'left'},
                       {field:'CurrentProductNo',title:'当前炉订单号',type:'string',width:110,align:'left'},
                       {field:'CurrentProducName',title:'当前炉生产名称',type:'string',width:110,align:'left'},
                       {field:'AnotherProductNo',title:'下一炉订单号',type:'string',width:110,align:'left'},
                       {field:'AnotherProducName',title:'下一炉产品名称',type:'string',width:110,align:'left'},
                       {field:'BatchNumber',title:'当前批号',type:'string',width:110,align:'left'},
                       {field:'StartTime',title:'当前开炉时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'EndTime',title:'计划结束时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Inventory',title:'实际投料量',type:'decimal',width:110,align:'left'},
                       {field:'CalculateProportion',title:'实际产量计算比例',type:'decimal',width:110,align:'left'},
                       {field:'EstimatedProduction',title:'预估实际产量',type:'decimal',width:110,align:'left'},
                       {field:'State',title:'状态',type:'int',bind:{ key:'感应炉_状态',data:[]},width:110,align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',bind:{ key:'enable',data:[]},width:110,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:110,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
